#ifndef SPECIALFUNCTIONS_UARTSCREEN_H_
#define SPECIALFUNCTIONS_UARTSCREEN_H_


#include "../McuDrivers/uart/uart.h"
#include "../McuDrivers/can/can.h"
#include <stdint.h>

#define UartScreen_ProtocolType_ID 1
#define UartScreen_Gear_ID 2
#define UartScreen_MtclMode_ID 3
#define UartScreen_Speed_ID 4
#define UartScreen_Torque_ID 5
#define UartScreen_MaxTorque_ID 6
#define UartScreen_ActPower_ID 7
#define UartScreen_DcVoltage_ID 8
#define UartScreen_DcCurrent_ID 9
#define UartScreen_AcVoltage_ID 10
#define UartScreen_AcCurrent_ID 11
#define UartScreen_WindingTemp_ID 12
#define UartScreen_MtclInvTemp_ID 13
#define UartScreen_ErrorLevel_ID 14
#define UartScreen_ErrorCode_ID 15
#define UartScreen_ErrorBits_ID 16
#define UartScreen_ErrorStr_ID 17
#define UartScreen_MtclVersion_ID 18

#define UartScreen_NormalData1_ID 50
#define UartScreen_NormalData2_ID 51
#define UartScreen_NormalData3_ID 52
#define UartScreen_NormalData4_ID 53
#define UartScreen_NormalData5_ID 54
#define UartScreen_NormalData6_ID 55
#define UartScreen_NormalData7_ID 56
#define UartScreen_NormalData8_ID 57


void ClearUartScreen();

void SendIntFromUartScreen(uint16_t id, int32_t data);

void SendStrFromUartScreen(uint16_t id, uint8_t *data, int32_t length);

void SendBytesFromUartScreen(uint16_t id,  uint8_t *data, int32_t length);

//往特定ID写数据
void SendCANDataFromUartScreen(uint16_t id, uCAN1_MSG *receiveCanMsg);

//自动添加新的ID数据到新行，相同ID数据直接覆盖
void SendCANDataFromUartScreenAutoShow(uCAN1_MSG *receiveCanMsg);

#endif /* SPECIALFUNCTIONS_UARTSCREEN_H_ */
